]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fixes for previous ShellAppSystem patch a138f59c
authorColin Walters <walters@verbum.org>
Tue, 8 Feb 2011 19:37:22 +0000 (14:37 -0500)
committerColin Walters <walters@verbum.org>
Tue, 8 Feb 2011 19:38:24 +0000 (14:38 -0500)
Wasn't amended by mistake.

src/shell-app-system.c
src/shell-window-tracker.c

index 0d5490168701853ab9f240dcca762087eb33d307..301fc3f5d7891e59aaf418fa88731f99824c2bbf 100644 (file)
@@ -1303,14 +1303,12 @@ _gather_pid_callback (GDesktopAppInfo   *gapp,
                       gpointer           data)
 {
   ShellApp *app;
-  ShellAppSystem *appsys;
   ShellWindowTracker *tracker;
 
   g_return_if_fail (data != NULL);
 
   app = SHELL_APP (data);
   tracker = shell_window_tracker_get_default ();
-  appsys = shell_app_system_get_default ();
 
   _shell_window_tracker_add_child_process_app (tracker,
                                                pid,
@@ -1389,7 +1387,7 @@ shell_app_info_launch_full (ShellAppInfo *info,
                                         shell_app_info_get_id (info));
 
   ret = g_desktop_app_info_launch_uris_as_manager (gapp, uris,
-                                                   (GAppLaunchContext*) context,
+                                                   G_APP_LAUNCH_CONTEXT (context),
                                                    G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
                                                    NULL, NULL,
                                                    _gather_pid_callback, shell_app,
index 61912bda662e90994ca8102fdc52018a92d3b1d5..a0255b501b79369cc353777ed30449b678d9bfc0 100644 (file)
@@ -393,6 +393,9 @@ get_app_from_window_pid (ShellWindowTracker  *tracker,
 
   pid = meta_window_get_pid (window);
 
+  if (pid == -1)
+    return NULL;
+
   return g_hash_table_lookup (tracker->launched_pid_to_app, GINT_TO_POINTER (pid));
 }
 
@@ -844,18 +847,18 @@ _shell_window_tracker_add_child_process_app (ShellWindowTracker *tracker,
                                              GPid                pid,
                                              ShellApp           *app)
 {
-  int pid_int = (int) pid;
+  gpointer pid_ptr = GINT_TO_POINTER((int)pid);
 
   if (g_hash_table_lookup (tracker->launched_pid_to_app,
-                           &pid_int))
+                           &pid_ptr))
     return;
 
   g_hash_table_insert (tracker->launched_pid_to_app,
-                       GINT_TO_POINTER (pid_int),
+                       pid_ptr,
                        g_object_ref (app));
   g_child_watch_add (pid, on_child_exited, NULL);
   /* TODO: rescan unassociated windows
-   * Very unlikely in practice that the launched app gets ahead of us
+   * Unlikely in practice that the launched app gets ahead of us
    * enough to map an X window before we get scheduled after the fork(),
    * but adding this note for future reference.
    */